package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Accessors(chain = true)
@Data
public class CategoryAddNewParam implements Serializable {
    @NotNull(message = "新增类别失败,必须提交类别名称")
    @ApiModelProperty(value = "类别名称",required = true,example = "汪恒贤的类别")
    private String name;


    @NotNull(message = "类别序号不能为空")
    @Range(max = 99, message = "排序序号值必须0~99之间")
    private Integer sort;

    @Range(min = 1, message = "parentId必须为正数")
    private Integer parentId;
    @Range(max = 1, message = "排序序号值必须0~1之间")
    private Integer enable;
    private String keywords;
    private String icon;
    @Range(max = 1, message = "isDisplay值必须0~1之间")
    private Integer isDisplay;
}
